//
//  SolarTerms.h
//  Calendar
//
//  Created by 曾玮 on 15/1/20.
//
//

#ifndef __Calendar__SolarTerms__
#define __Calendar__SolarTerms__

#include "Date.h"

double radIn2PI(double rad);

//void JQtest(int y);

// set dateTime of the solar term (termIndex = 0 for 小寒) in specified year
void dateTime4SolarTerm(DateTime& dateTime, int year, int termIndex);

// return the solar term index of the date
int solarTerm4Date(const Date& date, bool& firstDay);

inline int solarTerm4Date(const Date& date)
{
    bool first;
    return solarTerm4Date(date, first);
}

const char* getSolarTermName(int termIndex);

#endif /* defined(__Calendar__SolarTerms__) */
